package uw.illno.service.impl

import uw.illno.service.AdministratorService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import uw.illno.dao.AdministratorDao
import uw.illno.pojo.Student
import uw.illno.pojo.Admin
import uw.illno.pojo.Teacher

@Service("adminsevice")
class AdminStratorImpl : AdministratorService {
    @Autowired
    private lateinit var administratorDao: AdministratorDao
    override fun resetpwd(student: Student): Int {
        return administratorDao.resetpwd(student)
    }

    override fun findAll(): List<Student> {
        return administratorDao.findallStudent()
    }

    override fun acheck(admin: Admin): String? {
        return administratorDao.acheck(admin)
    }

    override fun scheck(student: Student): String? {
        return administratorDao.scheck(student)
    }

    override fun tcheck(teacher: Teacher): String? {
        return administratorDao.tcheck(teacher)
    }

    override fun findallTeacher(): List<Teacher> {
        return administratorDao.findallTeacher()
    }

    override fun student_insert(student: Student): Int {
        return administratorDao.student_insert(student)
    }

    override fun delete_student(student: Student): Int {
        return administratorDao.delete_student(student)
    }
}